import java.util.Random;
import java.util.Scanner;

public class ReverseArray {
    public static void main(String[] args) {
        Random rand=new Random();
        Scanner stdIn=new Scanner(System.in);
        int n;//用户放入n个元素
        System.out.print("请输入N个元素：");
        n=stdIn.nextInt();
        int a[]=new int[n];
        for (int i=0;i<a.length;i++) {
            a[i] = 10 + rand.nextInt(90);
            System.out.println("a[" + i + "]=" + a[i]);
        }
        System.out.println("=======");
        for (int i = 0; i <n/2 ; i++) {
           int t=a[i];
            a[i]=a[n-i-1];
            a[n-i-1]=t;

        }
        for (int i=0;i<a.length;i++)
            System.out.println("a[" + i + "]=" + a[i]);
    }

}
